<template>
    <Crud table="vmoneylog" :columns="columns" v-model:saveFormData="saveFormData" v-model:searchObj="searchObj" :showAdd="false" :showEdit="false">
        <template #save>
        </template>
        <template #search>
            <a-form
                layout="inline"
            >
                <a-form-item>
                  <RemoteSelect placeholder="用户" table="user" name_key="nickname" v-model:value="searchObj.user_id"/>
                </a-form-item>
            </a-form>
        </template>


    </Crud>
</template>

<script>

export default {
    name: "list",
    data: function () {
        return {
            saveFormData: {},
            searchObj: {},
            columns: [
                {
                    title: '用户ID',
                    key: 'user_id',
                },{
                    title: '之前',
                    key: 'before_num',
                },{
                    title: '变动额',
                    key: 'change_num',
                    render:(e)=>{
                      return e.up_or_down==1?'+'+e.change_num:'-'+e.change_num
                    }
                },{
                    title: '之后',
                    key: 'after_num',
                },{
                    title: '描述',
                    key: 'title',
                },{
                    title: '时间',
                    key: 'add_time',
                },
            ],
        };
    },
    components: {},
    created() {
    },
    methods: {
    }
}
</script>

<style scoped lang="less">
</style>